package a.j;

import a.d.w;
import a.d.z;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;

public class ie
  implements ActionListener
{
  private double a = 1.0D;
  private double b;
  private double c;
  private double d;
  private pg e;
  private boolean f;
  private qb g = new a_();
  private double h;
  private double i;
  private double j;
  private double k;
  private boolean l;
  public static boolean m;
  
  public ie(pg parampg, double paramDouble1, double paramDouble2)
  {
    a(parampg, paramDouble1, paramDouble2);
  }
  
  public void a(pg parampg, double paramDouble1, double paramDouble2)
  {
    boolean bool = ld.E;
    if (parampg != null)
    {
      if (!bool)
      {
        if (this.l)
        {
          if (bool) {
            break label120;
          }
          if (this.e != null)
          {
            if (bool) {
              break label120;
            }
            if (this.g != null)
            {
              this.e.b(this.g);
              this.l = false;
            }
          }
        }
        this.e = parampg;
        a(0.0D, 0.0D);
        this.f = true;
        this.k = (paramDouble2 - parampg.J().getY());
        this.j = (paramDouble1 - parampg.J().getX());
        this.c = 0.0D;
        this.d = 0.0D;
        this.h = 0.0D;
      }
      label120:
      this.i = 0.0D;
    }
  }
  
  public void a(double paramDouble)
  {
    this.a = paramDouble;
  }
  
  public double a()
  {
    return this.a;
  }
  
  public void a(qb paramqb)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (this.l)
      {
        if (bool) {
          break label54;
        }
        if (this.e != null)
        {
          if (bool) {
            break label54;
          }
          if (this.g != null)
          {
            this.e.b(this.g);
            this.l = false;
          }
        }
      }
    }
    label54:
    this.g = paramqb;
  }
  
  public qb b()
  {
    return this.g;
  }
  
  public void c()
  {
    boolean bool = ld.E;
    if ((bool) || (this.e != null))
    {
      if (!bool) {
        if (!this.l)
        {
          if (bool) {
            break label54;
          }
          if (this.g != null)
          {
            this.e.a(this.g);
            this.l = true;
          }
        }
      }
      label54:
      this.e.b();
    }
  }
  
  public void d()
  {
    boolean bool = ld.E;
    if ((bool) || (this.e != null))
    {
      if (!bool) {
        if (this.l)
        {
          this.e.b(this.g);
          this.l = false;
        }
      }
      this.e.b();
    }
  }
  
  public void a(double paramDouble1, double paramDouble2)
  {
    boolean bool = ld.E;
    double d1 = Math.sqrt(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2);
    this.c = paramDouble1;
    this.d = paramDouble2;
    if (!bool)
    {
      if (d1 == 0.0D)
      {
        this.h = 0.0D;
        this.i = 0.0D;
        if (bool) {
          return;
        }
        if (!ld.D) {}
      }
      else
      {
        this.h = (paramDouble1 / d1);
      }
    }
    else {
      this.i = (paramDouble2 / d1);
    }
    this.b = (this.a * Math.sqrt(d1));
    this.e.b();
  }
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    e();
    this.e.b();
  }
  
  private void e()
  {
    Point2D localPoint2D = this.e.J();
    this.e.a(localPoint2D.getX() + this.h * this.b, localPoint2D.getY() + this.i * this.b);
  }
  
  public z f()
  {
    return new z(this.h, this.i);
  }
  
  public w g()
  {
    double d1 = this.e.J().getX() + this.j;
    double d2 = this.e.J().getY() + this.k;
    return new w(d1, d2);
  }
  
  class a_
    implements qb
  {
    private double a;
    private double b;
    private Line2D c = new Line2D.Double();
    private ab d = ab.f;
    
    a_() {}
    
    public void paint(Graphics2D paramGraphics2D)
    {
      this.a = (ie.this.e.J().getX() + ie.this.j);
      this.b = (ie.this.e.J().getY() + ie.this.k);
      this.c.setLine(this.a, this.b, this.a + ie.this.c, this.b + ie.this.d);
      paramGraphics2D.draw(this.c);
      this.d.a(paramGraphics2D, this.a + ie.this.c, this.b + ie.this.d, ie.this.h, ie.this.i);
    }
    
    public Rectangle getBounds()
    {
      Rectangle localRectangle = this.c.getBounds();
      localRectangle.x -= 5;
      localRectangle.y -= 5;
      localRectangle.width += 10;
      localRectangle.height += 10;
      return localRectangle;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.ie

 * JD-Core Version:    0.7.0.1

 */